Fix BuildError variant mismatch and unused import warnings#5
Merged
febyeji merged 1 commit intoadd-cbf-chain-sourcefrom Mar 27, 2026
Merged
Fix BuildError variant mismatch and unused import warnings#5febyeji merged 1 commit intoadd-cbf-chain-sourcefrom
febyeji merged 1 commit intoadd-cbf-chain-sourcefrom
Conversation
Owner
febyeji
commented
Mar 27, 2026
- A simple build fix
16b3734 to
bbe2544
Compare
febyeji
added a commit
that referenced
this pull request
Apr 7, 2026
febyeji
added a commit
that referenced
this pull request
Apr 24, 2026
febyeji
added a commit
that referenced
this pull request
Apr 24, 2026
* Add BIP 157 compact block filter chain source * Add CBF integration tests and documentation * Add optional fee source from esplora/electrum Fixes the problem when the funding tx is not registered for CBF node, for example during splicing. Added macros to skip incompatible with CBF backend tests (which require mempool). * Remove race condition in test unified_send_receive Decrease timeouts to not falsely conclude some tests as passing * Fix CBF chain source build errors and UniFFI bindings (#5) * Remove last_synced_height from cbf Previously we tracked synced height and also had dirty flag for rescan which was made from the genesis block. This was removed in favor of block heights from channel manager and onchain wallet. Safety reorg interval of 7 blocks (look-back) is added. Force tests use CBF config with 1 required peers, as otherwise it would die if one of two required peers went offline (which made impossible testing of scenarios with 2 nodes on which goes offline). * feat(cbf): add auto-restart with exponential backoff (#10) * refactor(cbf): extract build_cbf_node helper and add wallet reference * feat(cbf): auto-restart bip157 node with exponential backoff * feat(cbf): add liveness check before returning requester * fix(cbf): clean up scan state on filter scan failure * fix(cbf): add per-block-fetch timeout to wallet sync * test(cbf): strengthen wait_for_cbf_sync with state verification The old wait_for_cbf_sync only checked that the onchain sync timestamp advanced, which could false-pass when the timestamp updated but wallet state was still stale. The new version verifies both onchain and lightning wallet syncs completed, and accepts a check closure so callers can assert concrete wallet state (e.g. balance, payment existence). Also simplifies CbfSyncConfig in test setup to use Default (which already sets required_peers: 1 and reasonable timeouts). * Add test to capture wallet checkpoint push problems * fix(cbf): use CheckPoint::insert for reorg-aware wallet sync `push` only appends above the tip, so when `recent_history` contained blocks at or below the wallet's current checkpoint height after a reorg, the stale hashes on the wallet checkpoint were never replaced. Switch to `CheckPoint::insert`, which detects conflicting hashes and purges stale blocks, matching bdk-kyoto's `UpdateBuilder::apply_chain_event`. Also clear `latest_tip` on `BlockHeaderChanges::Reorganized` so cached tip state does not point at an abandoned chain. Update the `checkpoint_building_handles_reorg` unit test (added in c1844b3) to exercise the fixed behaviour: a reorg where the new tip is at the same height as the wallet's checkpoint must still result in the reorged hashes winning. Disclosure: drafted with assistance from Claude Code. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com> * remove latest_tip from the cbf chain source * fix(cbf): advance lightning-wallet sync timestamp when no scripts registered `sync_lightning_wallet` returned early without updating `latest_lightning_wallet_sync_timestamp` when no scripts were registered, causing `wait_for_cbf_sync` to hang on start/stop/reinit cycles. Fold the empty-scripts branch into the main path so both share a single `update_node_metrics_timestamp` site at the end of the closure. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com> * fix(cbf): treat UnknownHash as skip-this-cycle in fee_rate_cache_from_cbf After a checkpoint-based resume, `requester.chain_tip()` can return the checkpoint hash which has no `BlockNode` in kyoto's tree yet, causing `get_block` to fail with `FetchBlockError::UnknownHash` and surfacing as `FeerateEstimationUpdateFailed` from `node.start()`. Skip the cycle and retry later instead of erroring. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com> * retrigger CI * fix(cbf): update write_node_metrics to update_and_persist_node_metrics after upstream API change Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> --------- Co-authored-by: Yeji Han <yeji.hvn@gmail.com> Co-authored-by: Claude Opus 4.7 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.